home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
wlib11_2.zip
/
EXAMPLES.EXE
/
EXAM2.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-03-13
|
2KB
|
66 lines
#include "window.h"
#define NORM CREATE_VIDEO_ATTRIBUTE(black,white) /* define video
attribute */
#define BLUEONBLACK CREATE_VIDEO_ATTRIBUTE(black,blue) /* define
video attribute */
#define REDONBLACK CREATE_VIDEO_ATTRIBUTE(black,red)
#define GREENONBLACK CREATE_VIDEO_ATTRIBUTE(black,green)
main()
{
int i;
WPOINTER w1,w2,w3; /* pointers to a window structures */
WindowInitializeSystem(); /* system initialization function */
WindowSaveInitial(0);
w1 = WindowInitialize(BORDER, /* Window has a border */
1, /* row on the screen to open window */
1, /* column on screen to open window */
30, /* width in characters of the window */
15, /* height of characters in window */
BLUEONBLACK, /* video attribute of text area of window */
NORM, /* video attribute of border */
SINGLEBOX); /* type of border to draw */
/* define second window */
w2 = WindowInitialize(BORDER,3,3,30,15,REDONBLACK,NORM,DOUBLEBOX);
/* define third window */
w3 = WindowInitialize(BORDER,5,5,30,15,GREENONBLACK,NORM,SINGLEBOX);
WindowOpen(w1); /* make window 1 ok to write */
WindowOpen(w2); /* make window 2 ok to write */
WindowOpen(w3); /* make window 3 ok to write */
WindowDisplay(w1,1,NOEFFECT);
WindowDisplay(w2,2,NOEFFECT);
WindowDisplay(w3,3,NOEFFECT);
GET_KEY();
WindowDisplay(w2,1,NOEFFECT);
GET_KEY();
WindowDisplay(w3,1,NOEFFECT);
GET_KEY();
WindowDisplay(w1,1,NOEFFECT);
GET_KEY();
WindowClose(w2,NOEFFECT);
GET_KEY();
WindowClose(w3,NOEFFECT);
GET_KEY();
WindowClose(w1,NOEFFECT);
}